//
//  MeetingRooms.swift
//  LeetCodeDemo
//
//  Created by 杨冬武 on 2021/3/21.
//

import Foundation

class MeetingRooms {
    func canAttendMeetings(_ intervals: [[Int]]) -> Bool {
        var temp = intervals
        temp.sort { $0[0] < $1[0] }
        for i in 1..<temp.count {
            if temp[i][1] < temp[i - 1][1] {
                return false
            }
        }
        return true
    }
}
